<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::IndexHNSW Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><a class="el" href="structfaiss_1_1IndexHNSW.html">IndexHNSW</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structfaiss_1_1IndexHNSW-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::IndexHNSW Struct Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="IndexHNSW_8h_source.html">IndexHNSW.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for faiss::IndexHNSW:</div>
<div class="dyncontent">
 <div class="center">
  <img src="structfaiss_1_1IndexHNSW.png" usemap="#faiss::IndexHNSW_map" alt=""/>
  <map id="faiss::IndexHNSW_map" name="faiss::IndexHNSW_map">
<area href="structfaiss_1_1Index.html" alt="faiss::Index" shape="rect" coords="238,0,387,24"/>
<area href="structfaiss_1_1IndexHNSW2Level.html" alt="faiss::IndexHNSW2Level" shape="rect" coords="0,112,149,136"/>
<area href="structfaiss_1_1IndexHNSWFlat.html" alt="faiss::IndexHNSWFlat" shape="rect" coords="159,112,308,136"/>
<area href="structfaiss_1_1IndexHNSWPQ.html" alt="faiss::IndexHNSWPQ" shape="rect" coords="318,112,467,136"/>
<area href="structfaiss_1_1IndexHNSWSQ.html" alt="faiss::IndexHNSWSQ" shape="rect" coords="477,112,626,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad2da92276e4caf988c696f9a32981021"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2da92276e4caf988c696f9a32981021"></a>
typedef <a class="el" href="structfaiss_1_1HNSW.html#ae1342fc2f07c325598a73b733e88ee74">HNSW::storage_idx_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>storage_idx_t</b></td></tr>
<tr class="separator:ad2da92276e4caf988c696f9a32981021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_structfaiss_1_1Index"><td colspan="2" onclick="javascript:toggleInherit('pub_types_structfaiss_1_1Index')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="structfaiss_1_1Index.html">faiss::Index</a></td></tr>
<tr class="memitem:ad3f0d3071f987baabbdd3da4500c87ea inherit pub_types_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3f0d3071f987baabbdd3da4500c87ea"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> = long</td></tr>
<tr class="memdesc:ad3f0d3071f987baabbdd3da4500c87ea inherit pub_types_structfaiss_1_1Index"><td class="mdescLeft">&#160;</td><td class="mdescRight">all indices are this type <br/></td></tr>
<tr class="separator:ad3f0d3071f987baabbdd3da4500c87ea inherit pub_types_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af317cb1e2ad0bd145f716f2243b693eb inherit pub_types_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af317cb1e2ad0bd145f716f2243b693eb"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>component_t</b> = float</td></tr>
<tr class="separator:af317cb1e2ad0bd145f716f2243b693eb inherit pub_types_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c60d7a12bf3ad27054963df8cccd93f inherit pub_types_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c60d7a12bf3ad27054963df8cccd93f"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>distance_t</b> = float</td></tr>
<tr class="separator:a1c60d7a12bf3ad27054963df8cccd93f inherit pub_types_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac3096b022ac94a7d6016642942933928"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3096b022ac94a7d6016642942933928"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>IndexHNSW</b> (int <a class="el" href="structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d">d</a>=0, int M=32)</td></tr>
<tr class="separator:ac3096b022ac94a7d6016642942933928"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74d1ec193f1749a55ec83b6c7779119c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74d1ec193f1749a55ec83b6c7779119c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>IndexHNSW</b> (<a class="el" href="structfaiss_1_1Index.html">Index</a> *storage, int M=32)</td></tr>
<tr class="separator:a74d1ec193f1749a55ec83b6c7779119c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a705defb737ebffd94eac1ccf9e7842da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a705defb737ebffd94eac1ccf9e7842da"></a>
virtual <a class="el" href="structfaiss_1_1DistanceComputer.html">DistanceComputer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>get_distance_computer</b> () const =0</td></tr>
<tr class="separator:a705defb737ebffd94eac1ccf9e7842da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04a761ce17d0f9040b3bc8a77bd627d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#a04a761ce17d0f9040b3bc8a77bd627d9">add</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x) override</td></tr>
<tr class="separator:a04a761ce17d0f9040b3bc8a77bd627d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40bc6d2c67545f95e322c63d68a47140"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a40bc6d2c67545f95e322c63d68a47140"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#a40bc6d2c67545f95e322c63d68a47140">train</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x) override</td></tr>
<tr class="memdesc:a40bc6d2c67545f95e322c63d68a47140"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trains the storage if needed. <br/></td></tr>
<tr class="separator:a40bc6d2c67545f95e322c63d68a47140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0ddf6ab4a54239a25d6277e21e8548e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0ddf6ab4a54239a25d6277e21e8548e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#ae0ddf6ab4a54239a25d6277e21e8548e">search</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> k, float *distances, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> *labels) const override</td></tr>
<tr class="memdesc:ae0ddf6ab4a54239a25d6277e21e8548e"><td class="mdescLeft">&#160;</td><td class="mdescRight">entry point for search <br/></td></tr>
<tr class="separator:ae0ddf6ab4a54239a25d6277e21e8548e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a660e5c8de1ba9c71bf3fe1f3bf0c8812"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#a660e5c8de1ba9c71bf3fe1f3bf0c8812">reconstruct</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> key, float *recons) const override</td></tr>
<tr class="separator:a660e5c8de1ba9c71bf3fe1f3bf0c8812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4b9f97d42e2521e01f8b60012985396"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4b9f97d42e2521e01f8b60012985396"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#ad4b9f97d42e2521e01f8b60012985396">reset</a> () override</td></tr>
<tr class="memdesc:ad4b9f97d42e2521e01f8b60012985396"><td class="mdescLeft">&#160;</td><td class="mdescRight">removes all elements from the database. <br/></td></tr>
<tr class="separator:ad4b9f97d42e2521e01f8b60012985396"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37f79ff64b8aa13977c1b4dbccf3eec6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37f79ff64b8aa13977c1b4dbccf3eec6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>shrink_level_0_neighbors</b> (int size)</td></tr>
<tr class="separator:a37f79ff64b8aa13977c1b4dbccf3eec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b619a41ddd52f0377efb701829c1e43"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#a5b619a41ddd52f0377efb701829c1e43">search_level_0</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> k, const storage_idx_t *nearest, const float *nearest_d, float *distances, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> *labels, int nprobe=1, int search_type=1) const </td></tr>
<tr class="separator:a5b619a41ddd52f0377efb701829c1e43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a86c58212f3f9cf88394f5297cba525"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a86c58212f3f9cf88394f5297cba525"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#a9a86c58212f3f9cf88394f5297cba525">init_level_0_from_knngraph</a> (int k, const float *D, const <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> *I)</td></tr>
<tr class="memdesc:a9a86c58212f3f9cf88394f5297cba525"><td class="mdescLeft">&#160;</td><td class="mdescRight">alternative graph building <br/></td></tr>
<tr class="separator:a9a86c58212f3f9cf88394f5297cba525"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9c75063090927f8f65d1896b6949af4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9c75063090927f8f65d1896b6949af4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1IndexHNSW.html#ab9c75063090927f8f65d1896b6949af4">init_level_0_from_entry_points</a> (int npt, const storage_idx_t *points, const storage_idx_t *nearests)</td></tr>
<tr class="memdesc:ab9c75063090927f8f65d1896b6949af4"><td class="mdescLeft">&#160;</td><td class="mdescRight">alternative graph building <br/></td></tr>
<tr class="separator:ab9c75063090927f8f65d1896b6949af4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a949f66fe1ed3f6256d0d84cf532fade8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a949f66fe1ed3f6256d0d84cf532fade8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>reorder_links</b> ()</td></tr>
<tr class="separator:a949f66fe1ed3f6256d0d84cf532fade8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c0277b782f0f16ae33e30a1450bd8d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c0277b782f0f16ae33e30a1450bd8d3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>link_singletons</b> ()</td></tr>
<tr class="separator:a2c0277b782f0f16ae33e30a1450bd8d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structfaiss_1_1Index"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structfaiss_1_1Index')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="structfaiss_1_1Index.html">faiss::Index</a></td></tr>
<tr class="memitem:a7b8cc435b5619d5d8382010a424bf67e inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b8cc435b5619d5d8382010a424bf67e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Index</b> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> <a class="el" href="structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d">d</a>=0, <a class="el" href="namespacefaiss.html#afd12191c638da74760ff397cf319752c">MetricType</a> metric=METRIC_L2)</td></tr>
<tr class="separator:a7b8cc435b5619d5d8382010a424bf67e inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6931dfe054b33b02c842ff75f7a0c7f inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#aa6931dfe054b33b02c842ff75f7a0c7f">add_with_ids</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x, const long *xids)</td></tr>
<tr class="separator:aa6931dfe054b33b02c842ff75f7a0c7f inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a236897832a58dbb205e2d662c1929fb1 inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a236897832a58dbb205e2d662c1929fb1">range_search</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x, float radius, <a class="el" href="structfaiss_1_1RangeSearchResult.html">RangeSearchResult</a> *result) const </td></tr>
<tr class="separator:a236897832a58dbb205e2d662c1929fb1 inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c">assign</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> *labels, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> k=1)</td></tr>
<tr class="separator:a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8bf7bd97aeed8ad5fc48b242379a68a inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">virtual long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#af8bf7bd97aeed8ad5fc48b242379a68a">remove_ids</a> (const <a class="el" href="structfaiss_1_1IDSelector.html">IDSelector</a> &amp;sel)</td></tr>
<tr class="separator:af8bf7bd97aeed8ad5fc48b242379a68a inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1936604fffe16b0ef2a3879305950738 inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a1936604fffe16b0ef2a3879305950738">reconstruct_n</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> i0, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> ni, float *recons) const </td></tr>
<tr class="separator:a1936604fffe16b0ef2a3879305950738 inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5b4e63e1064f9bf9c75625d114b353f inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#aa5b4e63e1064f9bf9c75625d114b353f">search_and_reconstruct</a> (<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, const float *x, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> k, float *distances, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> *labels, float *recons) const </td></tr>
<tr class="separator:aa5b4e63e1064f9bf9c75625d114b353f inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaae77608bbda70b1098897e9167a82f9 inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#aaae77608bbda70b1098897e9167a82f9">compute_residual</a> (const float *x, float *residual, <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> key) const </td></tr>
<tr class="separator:aaae77608bbda70b1098897e9167a82f9 inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a373c30e3d87d1d4e616f450d87152b1a inherit pub_methods_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a373c30e3d87d1d4e616f450d87152b1a">display</a> () const </td></tr>
<tr class="separator:a373c30e3d87d1d4e616f450d87152b1a inherit pub_methods_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a954090e224ed05cdec6f3ccab394c091"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a954090e224ed05cdec6f3ccab394c091"></a>
<a class="el" href="structfaiss_1_1HNSW.html">HNSW</a>&#160;</td><td class="memItemRight" valign="bottom"><b>hnsw</b></td></tr>
<tr class="separator:a954090e224ed05cdec6f3ccab394c091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96137d57aafb7275ebba0253d627a820"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96137d57aafb7275ebba0253d627a820"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>own_fields</b></td></tr>
<tr class="separator:a96137d57aafb7275ebba0253d627a820"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2122830e5b8b02057bde264b74da6f00"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2122830e5b8b02057bde264b74da6f00"></a>
<a class="el" href="structfaiss_1_1Index.html">Index</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>storage</b></td></tr>
<tr class="separator:a2122830e5b8b02057bde264b74da6f00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb9cbfc543b6d9f1cae90a49148aee69"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb9cbfc543b6d9f1cae90a49148aee69"></a>
<a class="el" href="structfaiss_1_1ReconstructFromNeighbors.html">ReconstructFromNeighbors</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>reconstruct_from_neighbors</b></td></tr>
<tr class="separator:aeb9cbfc543b6d9f1cae90a49148aee69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_structfaiss_1_1Index"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_structfaiss_1_1Index')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="structfaiss_1_1Index.html">faiss::Index</a></td></tr>
<tr class="memitem:a2a002388d2c081c2dbab8508dcefe73d inherit pub_attribs_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a002388d2c081c2dbab8508dcefe73d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d">d</a></td></tr>
<tr class="memdesc:a2a002388d2c081c2dbab8508dcefe73d inherit pub_attribs_structfaiss_1_1Index"><td class="mdescLeft">&#160;</td><td class="mdescRight">vector dimension <br/></td></tr>
<tr class="separator:a2a002388d2c081c2dbab8508dcefe73d inherit pub_attribs_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6970683faa021b7a6f1a0865c0d4eccd inherit pub_attribs_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6970683faa021b7a6f1a0865c0d4eccd"></a>
<a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a6970683faa021b7a6f1a0865c0d4eccd">ntotal</a></td></tr>
<tr class="memdesc:a6970683faa021b7a6f1a0865c0d4eccd inherit pub_attribs_structfaiss_1_1Index"><td class="mdescLeft">&#160;</td><td class="mdescRight">total nb of indexed vectors <br/></td></tr>
<tr class="separator:a6970683faa021b7a6f1a0865c0d4eccd inherit pub_attribs_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5590d847c5c2b958affd2a05e58a6f23 inherit pub_attribs_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5590d847c5c2b958affd2a05e58a6f23"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a5590d847c5c2b958affd2a05e58a6f23">verbose</a></td></tr>
<tr class="memdesc:a5590d847c5c2b958affd2a05e58a6f23 inherit pub_attribs_structfaiss_1_1Index"><td class="mdescLeft">&#160;</td><td class="mdescRight">verbosity level <br/></td></tr>
<tr class="separator:a5590d847c5c2b958affd2a05e58a6f23 inherit pub_attribs_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e92732617c4dbe364e7678dd8773a7f inherit pub_attribs_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e92732617c4dbe364e7678dd8773a7f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a6e92732617c4dbe364e7678dd8773a7f">is_trained</a></td></tr>
<tr class="memdesc:a6e92732617c4dbe364e7678dd8773a7f inherit pub_attribs_structfaiss_1_1Index"><td class="mdescLeft">&#160;</td><td class="mdescRight">set if the <a class="el" href="structfaiss_1_1Index.html">Index</a> does not require training, or if training is done already <br/></td></tr>
<tr class="separator:a6e92732617c4dbe364e7678dd8773a7f inherit pub_attribs_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e18f641854b2bde83ecff0a2f9a6f4e inherit pub_attribs_structfaiss_1_1Index"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e18f641854b2bde83ecff0a2f9a6f4e"></a>
<a class="el" href="namespacefaiss.html#afd12191c638da74760ff397cf319752c">MetricType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Index.html#a8e18f641854b2bde83ecff0a2f9a6f4e">metric_type</a></td></tr>
<tr class="memdesc:a8e18f641854b2bde83ecff0a2f9a6f4e inherit pub_attribs_structfaiss_1_1Index"><td class="mdescLeft">&#160;</td><td class="mdescRight">type of metric this index uses for search <br/></td></tr>
<tr class="separator:a8e18f641854b2bde83ecff0a2f9a6f4e inherit pub_attribs_structfaiss_1_1Index"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="structfaiss_1_1HNSW.html">HNSW</a> index is a normal random-access index with a <a class="el" href="structfaiss_1_1HNSW.html">HNSW</a> link structure built on top </p>

<p>Definition at line <a class="el" href="IndexHNSW_8h_source.html#l00069">69</a> of file <a class="el" href="IndexHNSW_8h_source.html">IndexHNSW.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a04a761ce17d0f9040b3bc8a77bd627d9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::IndexHNSW::add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Add n vectors of dimension d to the index.</p>
<p>Vectors are implicitly assigned labels ntotal .. ntotal + n - 1 This function slices the input vectors in chuncks smaller than blocksize_add and calls add_core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>input matrix, size n * d </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="structfaiss_1_1Index.html#a1b5e9ac70adbce0897dd6c8276ad96f2">faiss::Index</a>.</p>

<p>Definition at line <a class="el" href="IndexHNSW_8cpp_source.html#l00294">294</a> of file <a class="el" href="IndexHNSW_8cpp_source.html">IndexHNSW.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a660e5c8de1ba9c71bf3fe1f3bf0c8812"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::IndexHNSW::reconstruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>recons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reconstruct a stored vector (or an approximation if lossy coding)</p>
<p>this function may not be defined for some indexes </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>id of the vector to reconstruct </td></tr>
    <tr><td class="paramname">recons</td><td>reconstucted vector (size d) </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="structfaiss_1_1Index.html#aaef6f4132b1f390121ebb11058baf190">faiss::Index</a>.</p>

<p>Definition at line <a class="el" href="IndexHNSW_8cpp_source.html#l00312">312</a> of file <a class="el" href="IndexHNSW_8cpp_source.html">IndexHNSW.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5b619a41ddd52f0377efb701829c1e43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::IndexHNSW::search_level_0 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const storage_idx_t *&#160;</td>
          <td class="paramname"><em>nearest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>nearest_d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>distances</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> *&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nprobe</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>search_type</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Perform search only on level 0, given the starting points for each vertex.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">search_type</td><td>1:perform one search per nprobe, 2: enqueue all entry points </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="IndexHNSW_8cpp_source.html#l00355">355</a> of file <a class="el" href="IndexHNSW_8cpp_source.html">IndexHNSW.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>/data/users/hoss/faiss/<a class="el" href="IndexHNSW_8h_source.html">IndexHNSW.h</a></li>
<li>/data/users/hoss/faiss/<a class="el" href="IndexHNSW_8cpp_source.html">IndexHNSW.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
